#pragma once
class CProtocol
{
    uint _RunPerft();
    CBoard board[1];
    CFen   fen[1];
    CPerft perft[1];
    CBook   book[1];

    uint color;
    uintptr_t  hPerftThread, EngineThread;
    static void __cdecl _RunPerft_wrapper(void* o)
    {
        static_cast<CProtocol*>(o)->_RunPerft();
    }

    uint tread_ctrl, tread_state;

public:
    CProtocol();
    ~CProtocol();

    uint SetDefaultPosition();
    uint Run();
    uint UCI();
    uint QuitPrepare();
    uint IsReady();
    uint Perft();
    uint Stop();
    uint Position( char * line );
    uint Go( char * line );
    uint CreateBook( char * line );
};

